package com.gulimall.product.dao;

import com.gulimall.product.entity.AttrAttrgroupRelationEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 属性&属性分组关联
 * 
 * @author Rookie-886
 * @email ${email}
 * @date 2021-03-14 16:30:53
 */
@Mapper
public interface AttrAttrgroupRelationDao extends BaseMapper<AttrAttrgroupRelationEntity> {

    @Delete("<script>delete from pms_attr_attrgroup_relation where <foreach collection='list' item='i' separator=' or '>" +
            "(attr_id = #{i.attrId} and attr_group_id = #{i.attrGroupId})</foreach></script>")
    int deleteList(List<AttrAttrgroupRelationEntity> relationList);
}
